package com.ushine.design.design.a_creative_mode.f_single.b_eager;

/**
 * 饿汉式单例  ： 通过定义静态变量来实例化单例类
 *
 * @author yls
 */
public class EagerSingleton {
    private static final EagerSingleton instance = new EagerSingleton();

    private EagerSingleton() {

    }

    //静态方法
    public static EagerSingleton getInstance() {
        return instance;
    }
}
